﻿<html>
<FORM METHOD = POST ACTION="#">
<center><div style="border:blue 15px outset; padding:6px; background:pink; width:1300px;">
    <span style="color:rgb(24, 31, 232);font-family:arial, helvetica, clean, sans-serif;font-size:15px;background-color:red;">
       <div align="center" style="margin-left:0px;"><table border="6"
            background=" http://1.bp.blogspot.com/-VtyRLFDpV6U/UdBE0WtIrRI/AAAAAAAABvY/D5wBcmKkSQc/s320/movie2piza01.gif" 
              align="center" style="border-collapse:collapse;font-size:inherit;width:1300px;margin-left:auto;height:580px;color:blue;font-weight:bold;"><tbody><tr>
                <td style="margin-left:0px;vertical-align:top;"><p align="center">
				
<center><h1><b><font color="blue">Bài 4 <hr width =30%></font></h1></u>
      <br>
   <b><i><font color= "purple">Nhập vào giá trị:</font></i></b>
   <INPUT  TYPE= "char" NAME ="a" SIZE="20">
      <br><br>
   <input type="submit" name="text" value="Chuyển">
   <input type="reset" name="text" value= "  Xóa "> 
   <font color="blue" size="30">
	<?php
	if(isset($_POST["a"]))
{  
   $a=$_POST["a"];
       //  xét a=null or a=0
     if($a=="")
	   {
		  return "Chưa nhập giá trị";
	   }
        $s=$a%60;//echo $s;
		 $m=($a-$s)/60;
	     $h=$m%60;			       
		 $t=($m-$h)/60;
		 echo "<br>Thời gian:";
		 if($t>=10)
	     {   
	          echo $t;
	      }
		  else 
		  echo "0".$t;
		   if($h>=10)
	     {	   
	          echo ":".$h;
	      } 
		    else
			 echo ":0".$h;
		    if($s>=10)
	     {	   
	          echo ":".$s;
	      }
		     else 
			 echo ":0".$s;
}  
	  	  ?>
	  
</font></div></td></tr></tbody></table></div></span> </div></div></center>
 </FORM>
 </html>	
 
 
 
 
